package com.yjzx.util.binlog.core.constants;

/**
 * @author yjzx
 * @date 2024/10/11
 * @description BaseConstant
 */
public class BaseConstant {
    public static final String BINLOG_DEFAULT_POOL_PREFIX = "binLog_thread-";
    public static final String BINLOG_DEFAULT_INI_NAME = "binlog_position.ini";
    public static final String BINLOG_DEFAULT_INI_LINK_SEPARATOR = ":";

    public static final String BINLOG_MYSQL_LINK_SEPARATOR = BINLOG_DEFAULT_INI_LINK_SEPARATOR;
    public static final String BINLOG_MYSQL_LINK_PREFIX = "jdbc:mysql://";
    public static final String BINLOG_MYSQL_LINK_SUFFIX_DEFAULT = "?serverTimezone=UTC&characterEncoding=utf8&useUnicode=true&useSSL=true";
    public static final String BINLOG_MYSQL_LINK_SUFFIX = "?serverTimezone=UTC&characterEncoding=utf8&useUnicode=true&allowPublicKeyRetrieval=true&useSSL=true";

    public static final String BINLOG_MYSQL_DATABASE_SCHEMA_DATA_SQL = "SELECT TABLE_SCHEMA, TABLE_NAME, COLUMN_NAME, DATA_TYPE, ORDINAL_POSITION FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = ? ";
    public static final String BINLOG_MYSQL_DATABASE_TABLE_DATA_SQL = "SELECT TABLE_SCHEMA, TABLE_NAME, COLUMN_NAME, DATA_TYPE, ORDINAL_POSITION FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = ? and TABLE_NAME = ? ";

    public static final String BINLOG_MYSQL_TABLE_SCHEMA = "TABLE_SCHEMA";
    public static final String BINLOG_MYSQL_TABLE_NAME = "TABLE_NAME";
    public static final String BINLOG_MYSQL_COLUMN_NAME = "COLUMN_NAME";
    public static final String BINLOG_MYSQL_ORDINAL_POSITION = "ORDINAL_POSITION";
    public static final String BINLOG_MYSQL_DATA_TYPE = "DATA_TYPE";

}
